# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

# Source: http://bugs.gentoo.org/show_bug.cgi?id=72390
# Submitted-By: Julien Allanos <dju@gentoo.org>
# Updated-By: Jonatan Åkerlind <jonatan.akerlind@telia.com>
# Reviewed-By: wrobel 2006-09-12
# $Id$

inherit webapp

DESCRIPTION="PHP-based iCal file viewer/parser"
HOMEPAGE="http://phpicalendar.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"

KEYWORDS="~amd64 ~x86"
LICENSE="GPL-2"
IUSE="doc"

DEPEND="virtual/httpd-php"

src_install() {
	webapp_src_preinst

	cp -R ${PN}/* ${D}/${MY_HTDOCSDIR}
	
	local docs="README AUTHORS COPYING TIMEZONES"
	if use doc; then
		# handle documentation files
		for doc in ${docs}; do
			dodoc ${PN}/${doc}
		done
	fi
	# remove doc files from web area
	for doc in ${docs}; do
		rm -f ${D}/${MY_HTDOCSDIR}/${doc}
	done
	
	webapp_configfile ${MY_HTDOCSDIR}/config.inc.php
	webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt

	webapp_src_install
}
